
import { defineStore } from 'pinia'

export const useAppStore = defineStore('app', {
    state() {
      return {
        collapse: false // 左侧菜单是否收起
      }
    },
  
    getters: {
      asideWidth(state) {
        return state.collapse ? '60px' : '200px'
      }
    },
  
    actions: {
      toggleCollapsed() {
        this.collapse = !this.collapse
      }
    }
  })


